package com.scott.spring.ch07;

import com.scott.spring.ch07.conf.AppConf;
import com.scott.spring.ch07.service.RoleService;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

/**
 * @author 黄后林
 * @version 1.0
 * @date 2021-12-14 09:40:55
 */
public class Ch07Test {

    public static void main(String[] args) {
        System.out.println("--------容器启动开始--------");
        AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(AppConf.class);
        System.out.println("--------容器结束开始--------");

        //执行业务方法
        System.out.println(context.getBean(RoleService.class).add(10,20));

    }
}
